use strict;
use warnings;

use EMS::Model::Pilot;
use EMS::Model::Comment;

package EMS::Model::Event::Schema;
use Jifty::DBI::Schema;

# Your column definitions go here.  See L<Jifty::DBI::Schema> for
# documentation about how to write column definitions.

column name =>
    label is "Name",
    is mandatory,
    type is 'varchar(255)';

column organizer =>
    label is "Organizer",
    refers_to EMS::Model::Pilot,
    is mandatory;

column description =>
    label is "Description",
    is mandatory,
    type is 'text';
    
column allow_signups =>
    label is "Allow Signups?",
    is mandatory,
    default is '1',
    type is 'tinyint';

column begin_time =>
    label is "Begin Time",
    is mandatory,
    type is 'int unsigned';

column duration =>
    label is "Duration (Minutes)",
    type is 'mediumint',
    default is '0';

column comments =>
    label is "Comments",
    refers_to EMS::Model::CommentCollection by 'event';

package EMS::Model::Event;
use base qw/EMS::Record/;
use EMS::Model::CommentCollection;

# Your model-specific methods go here.

1;
